defmodule CofferTest.DummyDefinition do
  use Coffer.Definition

  # Defaults to [:original]
  def versions, do: [:original, :thumbnail]

  # defaults to :noaction
  def transform(:original, _file), do: :noaction

  def transform(:thumbnail, _file) do
    fn(input, output) ->
      {"convert", [input, "-strip", "-thumbnail", "100x100>", "-format", "png", output]}
    end
  end

  # defaults to Application.get_env(:coffer, :storage_dir)
  def storage_dir(_version, _file), do: "/tmp"

  # defaults to a random name
  def filename(version, _file), do: "dummy.#{version}.png"
end